#ifndef __UART_SHELL_H
#define __UART_SHELL_H

#include <bsp.h>
#include "stm32f10x.h"

enum
{
	COM_DISABLE,
	COM_ENABLE,
};

#define COM_SHELL_UART_PORT       (USART1)

#define COM_SHELL_UART_RCC         RCC_APB2Periph_USART1
#define COM_SHELL_UART_RCC_GPIO    RCC_APB2Periph_GPIOA
#define COM_SHELL_UART_GPIO_TX	   GPIO_Pin_9
#define COM_SHELL_UART_GPIO_RX	   GPIO_Pin_10
#define COM_SHELL_UART_GPIO		     GPIOA

#define COM_SHELL_UART_BAUD       (115200)

//#define COM_SHELL_INT_RCC          RCC_APB2Periph_GPIOA
//#define COM_SHELL_INT_PORT         GPIOA
//#define COM_SHELL_INT_GPIO         GPIO_Pin_10

//#define COM_SHELL_INT_SOURCE_PORT  GPIO_PortSourceGPIOA
//#define COM_SHELL_INT_SOURCE_GPIO  GPIO_PinSource10
//#define COM_SHELL_INT_LINE         EXTI_Line10
//#define COM_SHELL_INT_CHANNEL      EXTI15_10_IRQn

typedef void (*com_shell_cb_t)(unsigned char ch);
void com_shell_console_register_callback(com_shell_cb_t cb);
void com_shell_console_init(void);
void com_shell_console_put_byte(unsigned char ch);
void com_printf(unsigned char *buf, unsigned int len);

#endif
